<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To fetch the status of the multiple services # Configuration Type - COMPUTER # Arguments - The value needs to be hardcoded inside the script #> # List of service names you want to check needs to be hardcoded here $serviceNames = @( "wuauserv", # Windows Update "spooler", # Print Spooler "bits", # Background Intelligent Transfer Service "dhcp", # DHCP Client "eventlog" # Windows Event Log ) # Fetch and display information for the specified services foreach ($serviceName in $serviceNames) { $service = Get-Service -Name $serviceName -ErrorAction SilentlyContinue if ($service) { $service | Select-Object Name, DisplayName, Status | Format-Table -AutoSize } else { Write-Output "Service '$serviceName' not found." } }